﻿using System.Linq;
using Identity;
using Identity.Stores;

namespace Fee.Stores.Ef
{
    public class VendorStore<T> : IVendorStore<T> where T : MemberDbContextBase
    {
        private readonly T _context;

        public VendorStore(T context)
        {
            _context = context;
        }

        public Vendor GetById(int id)
        {
            return _context.Vendors.FirstOrDefault(_ => _.Id == id);
        }
    }
}